package com.woniu.adapter;

import com.woniu.config.FeignConfig;
import com.woniu.outlet.po.MaterialApplication;
import com.woniu.utils.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "production", qualifier = "provider", configuration = FeignConfig.class) // 标注该类是一个feign接口
public interface MatApplicationOpenFein {

    @GetMapping("MatApplication/getMatApplicationByCode")
    public ResponseResult<MaterialApplication> getMatApplicationByCode(@RequestParam("applicationCode") String applicationCode);

    @PutMapping("MatApplication/receive")
    public ResponseResult<String> receive(@RequestParam("applicationCode") String applicationCode);

    @PutMapping("Warehousing/updateStatus")
    public ResponseResult<String> updateStatus(@RequestParam("id") Integer id);

    @PutMapping("MatApplication/ready")
    public ResponseResult<String> ready(@RequestParam("applicationCode") String applicationCode);
}
